{include file="public/layout" /}
<script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
<style type="text/css">
    .system_table{ border:1px solid #dcdcdc; width:100%;}
    .system_table td{ height:40px; line-height:40px; font-size:12px; color:#454545; border-bottom:1px solid #dcdcdc; border-right:1px solid #dcdcdc; width:35%; padding-left:1%;}
    .system_table td.gray_bg{ background:#f7f7f7; width:15%;}
</style>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{empty name='$iframe'}
    {include file="order/left" /}
    <div class="page" style="min-width: auto; margin-left: 100px; padding-bottom: 15px;">
{else /}
    <div class="page" style="min-width:auto;">
{/empty}
    <div class="flexigrid">
        <div class="fixed-bar">
            <div class="item-title">
                <a class="back_xin" href="{empty name='$backurl'}javascript:history.back();{else /}{$backurl}{/empty}" title="返回"><i class="iconfont e-fanhui"></i></a>
                <div class="subject"> <h3>维权详情</h3> <h5></h5> </div>
            </div>
        </div>
        <div class="order-status pt5 pb5">
            <div class="status-item current">
                <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
                <div class="status-title">
                    <span class="text">{if condition="!empty($Service.manual_time) && 1 == $Service.manual_refund"}商家主动退款{else/}买家申请维权{/if}</span>
                    <span class="time">{$Service.add_time}</span>
                </div>
            </div>
            {if condition="!empty($Service.manual_time) && 1 == $Service.manual_refund"}
                <div class="status-item current">
                    <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
                    <div class="status-title"> <span class="text">商家退款完成</span> <span class="time">{$Service.manual_time}</span> </div>
                </div>
            {else/}
                {eq name="$Service.status" value="3"}
                <div class="status-item cancel">
                    <div class="status-icon"> <i class="iconfont e-quxiao"></i> </div>
                    <div class="status-title"> <span class="text">商家拒接申请</span> <span class="time">{$Service.update_time}</span> </div>
                </div>
                {else/}
                    {empty name="$Service.audit_time"}
                    <div class="status-item disabled">
                        <div class="status-icon"> 2 </div>
                        <div class="status-title"> <span class="text">商家处理维权</span> <span class="time"></span> </div>
                    </div>
                    {else/}
                    <div class="status-item current">
                        <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
                        <div class="status-title"> <span class="text">商家处理维权</span> <span class="time">{$Service.audit_time}</span> </div>
                    </div>
                    {/empty}
                    {in name="$Service.service_type" value="1, 2"}
                        {egt name="$Service.status" value="4"}
                        {empty name="$Service.users_delivery"}
                        <div class="status-item current">
                            <div class="status-icon"> 3 </div>
                            <div class="status-title"> <span class="text">买家已退货</span> <span class="time">{$Service.update_time}</span> </div>
                        </div>
                        {else/}
                        <div class="status-item current">
                            <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
                            <div class="status-title"> <span class="text">买家已退货</span> <span class="time">{$Service.users_delivery.time}</span> </div>
                        </div>
                        {/empty}
                        {else/}
                        <div class="status-item disabled">
                            <div class="status-icon"> 3 </div>
                            <div class="status-title"> <span class="text">买家已退货</span> <span class="time"></span> </div>
                        </div>
                        {/egt}
                        {eq name="$Service.status" value="9"}
                        <div class="status-item cancel">
                            <div class="status-icon"> <i class="iconfont e-quxiao"></i> </div>
                            <div class="status-title"> <span class="text">商家拒绝收货</span> <span class="time">{$Service.update_time}</span> </div>
                        </div>
                        {else/}
                            {egt name="$Service.status" value="5"}
                            <div class="status-item current">
                                <div class="status-icon"><i class="iconfont e-duihao"></i></div>
                                <div class="status-title"> <span class="text">商家已收货</span> <span class="time">{$Service.update_time}</span> </div>
                            </div>
                            {else/}
                            <div class="status-item disabled">
                                <div class="status-icon"> 4 </div>
                                <div class="status-title"> <span class="text">商家已收货</span> <span class="time"></span> </div>
                            </div>
                            {/egt}
                            {in name="$Service.service_type" value="2, 3"}
                                {eq name="$Service.status" value="7"}
                                <div class="status-item current">
                                    <div class="status-icon"><i class="iconfont e-duihao"></i></div>
                                    <div class="status-title"> <span class="text">商家退款完成</span> <span class="time">{$Service.update_time}</span> </div>
                                </div>
                                {else/}
                                <div class="status-item disabled">
                                    <div class="status-icon"> 5 </div>
                                    <div class="status-title"> <span class="text">商家退款完成</span> <span class="time"></span> </div>
                                </div>
                                {/eq}
                            {else/}
                                {empty name="$Service.admin_delivery"}
                                <div class="status-item disabled">
                                    <div class="status-icon"> 5 </div>
                                    <div class="status-title"> <span class="text">商家发货完成</span> <span class="time"></span> </div>
                                </div>
                                {else/}
                                <div class="status-item current">
                                    <div class="status-icon"> <i class="iconfont e-duihao"></i> </div>
                                    <div class="status-title"> <span class="text">商家发货完成</span> <span class="time">{$Service.admin_delivery.time}</span> </div>
                                </div>
                                {/empty}
                                <!-- {eq name="$Service.status" value="7"}
                                <div class="status-item current">
                                    <div class="status-icon"><i class="iconfont e-duihao"></i></div>
                                    <div class="status-title"> <span class="text">买家已收货</span> <span class="time">{$Service.update_time}</span> </div>
                                </div>
                                {else/}
                                <div class="status-item disabled">
                                    <div class="status-icon"> 6 </div>
                                    <div class="status-title"> <span class="text">买家已收货</span> <span class="time"></span> </div>
                                </div>
                                {/eq} -->
                            {/in}
                        {/eq}
                    {else/}
                        {eq name="$Service.status" value="7"}
                        <div class="status-item current">
                            <div class="status-icon"><i class="iconfont e-duihao"></i></div>
                            <div class="status-title"> <span class="text">商家退款完成</span> <span class="time">{$Service.update_time}</span> </div>
                        </div>
                        {else/}
                        <div class="status-item disabled">
                            <div class="status-icon">3</div>
                            <div class="status-title"> <span class="text">商家退款完成</span> <span class="time"></span> </div>
                        </div>
                        {/eq}
                    {/in}
                {/eq}
            {/if}
        </div>
    </div>
</div>

{empty name='$iframe'}
<div class="page mt10" style="min-width: auto; margin-left: 100px;">
{else /}
<div class="page mt10" style="min-width: auto;">
{/empty}
    <div class="flexigrid">
        <div class="mDiv"><div class="ftitle"><h3>订单信息</h3></div></div>
        <div class="order-information mb30">
            <div class="order-information-lumping">
                <div class="lumping-content">
                    <div class="lumping-content-title">订单编号：</div>
                    <div class="lumping-content-text">{$Order.order_code} <a class="copy order_code curpoin" onclick="unifiedCopy('order_code');" data-clipboard-text="{$Order.order_code}"><i class="iconfont e-fuzhi basics-color" title="点击复制"></i></a></div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">订单类型：</div>
                    <div class="lumping-content-text">{$Order.prom_type_name}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">订单来源：</div>
                    <div class="lumping-content-text">{$Order.order_terminal_show}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">付款方式：</div>
                    <div class="lumping-content-text">{$Order.pay_name_show}</div>
                </div>
            </div>
            <div class="order-information-contentTwo">
                <div class="lumping-content">
                    <div class="lumping-content-title">配送方式：</div>
                    <div class="lumping-content-text">{if condition="$Order.prom_type == 0"}{eq name="$Order.logistics_type" value="1"}物流配送{else/}到店自提{/eq}{elseif condition="$Order.prom_type == 1"}无需物流{/if}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">收货人：</div>
                    <div class="lumping-content-text">{eq name="$Order.logistics_type" value="2"}{$weappVerifyLog.buyer}{else /}{$Order.consignee}{/eq}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">联系电话：</div>
                    <div class="lumping-content-text">{eq name="$Order.logistics_type" value="2"}{$weappVerifyLog.phone}{else /}{$Order.mobile}{/eq}</div>
                </div>
                {eq name="$Order.logistics_type" value="2"}
                <div class="lumping-content">
                    <div class="lumping-content-title">核销码：</div>
                    <div class="lumping-content-text">{$weappVerifyLog.verify_code}</div>
                </div>
                {/eq}
                {if condition="$Order.prom_type == 0 && 1 == $Order.logistics_type"}
                <div class="lumping-content">
                    <div class="lumping-content-title">收货地址：</div>
                    <div class="lumping-content-text">{$Order.province}-{$Order.city}-{$Order.district}-{$Order.address}</div>
                </div>
                {/if}
            </div>
            <div class="order-information-contentTwo">
                <div class="lumping-content">
                    <div class="lumping-content-title">会员信息：</div>
                    <div class="lumping-content-text">
                        <img style="float: unset;border: 1px solid #e9edef;width: 24px;height: 24px;border-radius: 50%;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;" src="{$Users.head_pic}"/>
                        <a href="javascript:void(0);" data-href="{:url('Member/users_edit', ['id' => $Users.users_id, 'iframe' => 1])}" onclick="openFullframe(this, '会员资料', '100%', '100%');">{$Users.nickname}</a>
                    </div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">买家留言：</div>
                    <div class="lumping-content-text lumping-content-text-die">
                        {eyou:empty name='$Order.user_note' /}-{eyou:else /}{$Order.user_note}{/eyou:empty}
                    </div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">商家备注：</div>
                    <div class="lumping-content-text">
                        {notempty name="$Order.admin_note"}已有{$Order.admin_note_count}条备注{/notempty}
                        <a href="javascript:void(0);" data-href="{:url('shop/order_remarks', ['order_id'=>$Order.order_id])}" onclick="openFullframe(this, '商家备注', '600px', '50%');" id="adminNoteHtml">{empty name="$Order.admin_note"}添加{else/}查看{/empty}</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{empty name='$iframe'}
<div class="page mt10" style="min-width: auto; margin-left: 100px;">
{else /}
<div class="page mt10" style="min-width: auto;">
{/empty}
    <div class="flexigrid">
        <div class="mDiv"><div class="ftitle"><h3>当前维权状态</h3></div></div>
        <div class="order-information mb30">
            <div class="order-information-lumping" style="width: 100%;">
                <!-- 根据状态来显示下列内容 -->
                <div class="lumping-content">
                    <div class="lumping-content-title" style="line-height: 37px;">维权状态：</div>
                    <div class="lumping-content-text">
                        {eq name="$Service.status" value="1"}<span class="f-28" style="color: #ff1f2c;">申请维权</span>{/eq}
                        {if condition="2 == $Service.status && in_array($Service.service_type, [1, 2])"}
                        <span class="f-28" style="color: #2d8cf0;">申请已同意，待买家退货</span>
                        {/if}
                        {if condition="2 == $Service.status && in_array($Service.service_type, [3])"}
                        <span class="f-28" style="color: #2d8cf0;">申请已同意，请给买家退款</span>
                        {/if}
                        {eq name="$Service.status" value="4"}<span class="f-28" style="color: #19be6b;">买家已退货，商家待收货</span>{/eq}
                        {if condition="5 == $Service.status && 1 == $Service.service_type"}
                        <span class="f-28" style="color: #19be6b;">商家已收到退货，待重新发货</span>
                        {/if}
                        {if condition="5 == $Service.status && 2 == $Service.service_type"}
                        <span class="f-28" style="color: #19be6b;">商家已收到退货，待转账</span>
                        {/if}
                        {in name="$Service.status" value="3, 6, 7, 8"}<span class="f-28" style="color: #19be6b;">维权结束</span>{/in}
                        <!-- {eq name="$Service.status" value="9"}<span class="f-28" style="color: #939799;">商家拒绝收货</span>{/eq} -->
                    </div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title"></div>
                    <div class="lumping-content-text">
                        {eq name="$Service.status" value="1"}
                        <!-- <a href="javascript:void(0);" onclick="manualRefund();" class="lumping-btn-big lumping-btn-green mr10">手动退款</a> -->
                        <a href="JavaScript:void(0);" onclick="afterService(2);" class="lumping-btn-big lumping-btn-green mr10">同意申请</a>
                        <a href="JavaScript:void(0);" onclick="afterService(3);" class="lumping-btn-big lumping-btn-nogreen mr10">拒绝申请</a>
                        {/eq}

                        {if condition="2 == $Service.status && 3 == $Service.service_type"}
                        <!-- <a href="javascript:void(0);" onclick="manualRefund();" class="lumping-btn-big lumping-btn-green mr10">手动退款</a> -->
                        <a href="javascript:void(0);" data-href="{:url('ShopService/after_service_refund', ['service_id' => $Service.service_id])}" onclick="openFullframe(this, '维权退款处理', '674px', '564px');" class="lumping-btn-big lumping-btn-green mr10">转账</a>
                        {/if}

                        {eq name="$Service.status" value="4"}
                        <a href="javascript:void(0);" onclick="afterService(5);" class="lumping-btn-big lumping-btn-green mr10">确认收货</a>
                        <!-- <a href="javascript:void(0);" onclick="afterService(9);" class="lumping-btn-big lumping-btn-nogreen mr10">拒绝收货</a> -->
                        {/eq}

                        {if condition="5 == $Service.status && 2 == $Service.service_type"}
                        <a href="javascript:void(0);" data-href="{:url('ShopService/after_service_refund', ['service_id' => $Service.service_id])}" onclick="openFullframe(this, '维权退款处理', '674px', '564px');" class="lumping-btn-big lumping-btn-green mr10">转账</a>
                        {/if}

                        {if condition="5 == $Service.status && 1 == $Service.service_type"}
                        <a href="javascript:void(0);" data-href="{:url('ShopService/after_service_resend', ['service_id' => $Service.service_id])}" onclick="openFullframe(this, '维权重新发货', '800px', '62%');" class="lumping-btn-big lumping-btn-green mr10">重新发货</a>
                        {/if}

                        {notin name="$Service.status" value="3, 6, 7, 8, 9"}
                        <a href="javascript:void(0);" onclick="afterService(8);" class="lumping-btn-big mr10">关闭维权</a>
                        {/notin}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{empty name='$iframe'}
<div class="page mt10" style="min-width: auto; margin-left: 100px;">
{else /}
<div class="page mt10" style="min-width: auto;">
{/empty}
    <div class="flexigrid">
        <div class="mDiv"><div class="ftitle"><h3>维权信息</h3></div></div>
        <div class="order-information mb30">
            <div class="order-information-lumping">
                <h3 style="font-size: 14px; margin-bottom: 10px; font-weight: 600; margin-left: 15px;">维权信息</h3>
                <div class="lumping-content">
                    <div class="lumping-content-title">维权类型：</div>
                    <div class="lumping-content-text">{$Service.service_type_text}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">维权编号：</div>
                    <div class="lumping-content-text">{$Service.refund_code} <a class="copy refund_code curpoin" onclick="unifiedCopy('refund_code');" data-clipboard-text="{$Service.refund_code}"><i class="iconfont e-fuzhi basics-color" title="点击复制"></i></a></div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">维权时间：</div>
                    <div class="lumping-content-text">{$Service.add_time}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">维权原因：</div>
                    <div class="lumping-content-text">{eyou:empty name='$Service.refund_reason' /}-{eyou:else /}{$Service.refund_reason}{/eyou:empty}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">维权描述：</div>
                    <div class="lumping-content-text">{eyou:empty name='$Service.content' /}-{eyou:else /}{$Service.content}{/eyou:empty}</div>
                </div>
                {eyou:notempty name='$Service.upload_img' /}
                <div class="lumping-content">
                    <div class="lumping-content-title">维权图片：</div>
                    <div class="lumping-content-text">
                        {volist name="$Service.upload_img" id="vo"} <a href="{$vo}" target="_blank"><img src="{$vo}" style="width: 60px; height: 60px;margin-bottom: 5px;"></a> {/volist}
                    </div>
                </div>
                {/eyou:notempty}
            </div>

            {in name="$Service.service_type" value="2, 3"}
            <!-- 退款时显示 -->
            <div class="order-information-contentTwo">
                <h3 style="font-size: 14px; margin-bottom: 10px; font-weight: 600; margin-left: 15px;">退款信息</h3>
                {notempty name="$Order.is_change_price"}
                <div class="lumping-content">
                    <div class="lumping-content-title">注意事项：</div> <div class="lumping-content-text">此维权所属订单已改价，请仔细核对退款金额</div>
                </div>
                {/notempty}
                <div class="lumping-content">
                    <div class="lumping-content-title">退款总额：</div>
                    <div class="lumping-content-text">
                        {if condition="!empty($Order.actualPayPrice)"}￥{$Order.actualPayPrice}{else/}￥{$Service.refund_price}{/if}
                    </div>
                </div>
                <!-- {gt name="$Service.refund_balance" value="0"}
                <div class="lumping-content">
                    <div class="lumping-content-title">退回余额：</div> <div class="lumping-content-text">￥{$Service.refund_balance}</div>
                </div>
                {/gt} -->
                <!-- {gt name="$Service.refund_scores_num" value="0"}
                <div class="lumping-content">
                    <div class="lumping-content-title">退回积分：</div> <div class="lumping-content-text">{$Service.refund_scores_num}个(抵扣￥{$Service.refund_scores})</div>
                </div>
                {/gt} -->
                <div class="lumping-content">
                    <div class="lumping-content-title">退款说明：</div> <div class="lumping-content-text">{eyou:empty name='$Service.refund_remark' /}-{eyou:else /}{$Service.refund_remark}{/eyou:empty}</div>
                </div>
                <div class="lumping-content">
                    <div class="lumping-content-title">退款方式：</div> <div class="lumping-content-text">
                        {if condition="!empty($Service.refund_way) && 1 == $Service.refund_way"}
                        退款到余额
                        {elseif condition="!empty($Service.refund_way) && 2 == $Service.refund_way"}
                        线下退款
                        {elseif condition="!empty($Service.refund_way) && 3 == $Service.refund_way"}
                        原路退回(微信)
                        {/if}
                    </div>
                </div>
                {if condition="!empty($Service.refund_way) && 3 == $Service.refund_way" && 7 == $Service.status && 'wechat' == $Order.pay_name}
                <div class="lumping-content">
                    <div class="lumping-content-title">退款结果：</div>
                    <div class="lumping-content-text"><a href="javascript:void(0);" data-href="{:url('ShopService/after_service_inquire', ['service_id' => $Service.service_id, 'order_terminal' => $Order.order_terminal])}" onclick="openFullframe(this, '微信退款详情', '800px', '90%');">查询退款详情</a></div>
                </div>
                {/if}
            </div>
            {/in}

            {in name="$Service.service_type" value="1, 2"}
                <!-- 退货时显示 -->
                <div class="order-information-contentTwo">
                    <h3 style="font-size: 14px; margin-bottom: 10px; font-weight: 600; margin-left: 15px;">买家退货信息</h3>
                    <div class="lumping-content">
                        <div class="lumping-content-title">快递公司：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.users_delivery.name' /}-{eyou:else /}{$Service.users_delivery.name}{/eyou:empty}</div>
                    </div>
                    <div class="lumping-content">
                        <div class="lumping-content-title">快递单号：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.users_delivery.order' /}-{eyou:else /}{$Service.users_delivery.order}{/eyou:empty}</div>
                    </div>
                    <!-- <div class="lumping-content">
                        <div class="lumping-content-title">快递费用：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.users_delivery.cost' /}-{eyou:else /}￥{$Service.users_delivery.cost}{/eyou:empty}</div>
                    </div>
                    <div class="lumping-content">
                        <div class="lumping-content-title">发货时间：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.users_delivery.time' /}-{eyou:else /}{$Service.users_delivery.time}{/eyou:empty}</div>
                    </div> -->
                </div>
                {eq name="$Service.service_type" value="1"}
                <!-- 商家发货后显示 -->
                <div class="order-information-contentTwo">
                    <h3 style="font-size: 14px; margin-bottom: 10px; font-weight: 600; margin-left: 15px;">商家重发信息</h3>
                    <div class="lumping-content">
                        <div class="lumping-content-title">快递公司：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.admin_delivery.name' /}-{eyou:else /}{$Service.admin_delivery.name}{/eyou:empty}</div>
                    </div>
                    <div class="lumping-content">
                        <div class="lumping-content-title">快递单号：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.admin_delivery.code' /}-{eyou:else /}{$Service.admin_delivery.code}{/eyou:empty}</div>
                    </div>
                    <div class="lumping-content">
                        <div class="lumping-content-title">发货时间：</div>
                        <div class="lumping-content-text">{eyou:empty name='$Service.admin_delivery.time' /}-{eyou:else /}{$Service.admin_delivery.time}{/eyou:empty}</div>
                    </div>
                </div>
                {/eq}
            {/in}
        </div>
    </div>
</div>

{empty name='$iframe'}
<div class="page mt10" style="min-width: auto; margin-left: 100px;">
{else /}
<div class="page mt10" style="min-width: auto;">
{/empty}
    <div class="flexigrid flexigrid-xin" style=" padding-right: 1px; ">
        <div class="mDiv"><div class="ftitle" style="height: 24px;line-height: inherit;margin-bottom: 10px;"><h3>商品信息</h3></div></div>
        <div class="tableDiv  bubbleInfo mt5">
            <table cellspacing="0" cellpadding="0"  border="0" style="width: 100%;">
                <thead>
                    <tr>
                        <th> <div>商品名称</div> </th>
                        <th class="w200 tc"> <div>单价/数量</div> </th>
                        <th class="w120 tc"> <div>小计</div> </th>
                        <th class="w120 tc"> <div>优惠金额</div> </th>
                        <th class="w120 tc"> <div>实付款</div> </th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="order-empty"><td colspan="7"></td></tr>
                    <tr class="order-empty">
                        <td class="pl0">
                            <div class="goods-detail pl0">
                                <div class="goods-image">
                                    <img src="{$Details.product_img}">
                                </div>
                                <div class="goods-info">
                                    <p class="goods-title">{$Details.product_name}</p><p class="goods-spec">{$Details.product_spec}</p>
                                </div>
                            </div>
                        </td>
                        <td class="tc"><p>￥{$Details.product_price} x {$Details.num}</p></td>
                        <td class="tc"><p>￥{$Details.product_subtotal}</p></td>
                        <td class="tc"><p>￥{if condition="!empty($Order.couponsPrice)"}{$Order.couponsPrice}{else/}0{/if}</p></td>
                        <td class="tc"><p>￥{if condition="!empty($Order.actualPayPrice)"}{$Order.actualPayPrice}{else/}{$Details.product_subtotal}{/if}</p></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="order-total">
            <div class="order-total-box">
                <!-- <div class="order-total-con">
                    <div class="total-name"> 商品小计： </div>
                    <div class="total-value"> ￥{$Details.product_subtotal} </div>
                </div> -->
                <div class="order-total-con">
                    <div class="total-name"> 运费： </div>
                    <div class="total-value"> ￥{$Order.shipping_fee} </div>
                </div>
                {notempty name="$Order.coupon_id"}
                <div class="order-total-con">
                    <div class="total-name"> 优惠券： </div>
                    <div class="total-value"> -￥{$Order.coupon_price} </div>
                </div>
                {/notempty}
                {gt name="$Order.pay_use_balance" value="0"}
                <div class="order-total-con">
                    <div class="total-name"> 余额抵扣： </div>
                    <div class="total-value"> -￥{$Order.pay_use_balance} </div>
                </div>
                {/gt}
                <div class="order-total-con actual-payment mt10">
                    <div class="total-name"> 实付款： </div>
                    <div class="total-value">
                        ￥{if condition="!empty($Order.actualPayPrice)"}{$Order.actualPayPrice}{else/}{$Details.product_subtotal}{/if}
                    </div>
                </div>
                <div class="order-total-con">
                    <div class="total-name"> 维权退款： </div>
                    <div class="total-value">
                        ￥{if condition="!empty($Order.actualPayPrice)"}{$Order.actualPayPrice}{else/}{$Service.refund_price}{/if}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{empty name='$iframe'}
<div class="page mt10" style="min-width: auto; margin-left: 100px;">
{else /}
<div class="page mt10" style="min-width: auto;">
{/empty}
    <div class="flexigrid">
        <div class="mDiv"><div class="ftitle"><h3>维权订单日志</h3></div></div>
        <div class="hDiv" style="margin-top: 5px;">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                        <tr>
                            <th abbr="article_time" axis="col6">
                                <div class="tl text-l10">操作记录</div>
                            </th>
                            <th class="sign w210" axis="col0">
                                <div class="tc">操作人</div>
                            </th>
                            <th abbr="article_title" axis="col3" class="w210">
                                <div class="tc">操作时间</div>
                            </th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%;">
                    <tbody>
                    {empty name="Log"}
                        <tr>
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <div class="no_row">
                                    <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
                                </div>
                            </td>
                        </tr>
                    {else/}
                        {foreach name="Log" item="vo" key="k" }
                        <tr>
                            <td class="sort" style="width: 100%;"><div class="tl text-l10">{$vo.log_note}</div></td>
                            <td class="sort">
                                <div class="tc w210">
                                    {empty name="$vo.users_id"}
                                    {$vo.name}
                                    {else/}
                                    <a href="javascript:void(0);" data-href="{:url('Member/users_edit', ['id'=>$vo.users_id, 'iframe'=>1])}" onclick="openFullframe(this, '会员资料','100%','100%');">{$vo.name}</a>
                                    {/empty}
                                </div>
                            </td>
                            <td class="sort"><div class="tc w210">{$vo.add_time}</div></td>
                        </tr>
                        {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
    </div>
</div>

<script type="text/javascript">
    // 订单号复制
    function unifiedCopy(copyClass) {
        var clipboard1 = new Clipboard("." + copyClass);
        clipboard1.on("success", function(e) {
            layer.msg("复制成功");
        });
        clipboard1.on("error", function(e) {
            layer.msg("复制失败！请手动复制", {icon: 5});
        }); 
    }

    // 维权服务操作
    function afterService(status) {
        var serviceType = {$Service.service_type};
        var typeHtml = "<span style='color: blue;'>换货</span>";
        if (2 === parseInt(serviceType)) {
            typeHtml = "<span style='color: red;'>退货退款</span>";
        } else if (3 === parseInt(serviceType)) {
            typeHtml = "<span style='color: red;'>仅退款</span>";
        }
        if (2 === parseInt(status)) {
            var confirmMsg = '确认同意 ' + typeHtml + ' 申请？';
            var confirmBtn = ['同意申请', '取消'];
        } else if (3 === parseInt(status)) {
            var confirmMsg = '确认拒绝 ' + typeHtml + ' 申请？';
            var confirmBtn = ['拒绝申请', '取消'];
        } else if (5 === parseInt(status)) {
            var confirmMsg = '确认收到买家退回的商品？';
            var confirmBtn = ['确认收货', '取消'];
        } else if (8 === parseInt(status)) {
            var confirmMsg = '确认关闭 ' + typeHtml + ' 维权？';
            var confirmBtn = ['关闭维权', '取消'];
        } else if (9 === parseInt(status)) {
            var confirmMsg = '确认拒绝收货？';
            var confirmBtn = ['拒绝收货', '取消'];
        } else {
            layer.msg('类型错误，刷新重试', {time: 1500}, function() {window.location.reload();});
        }
        layer.confirm(confirmMsg, {
            move: false,
            closeBtn: 3,
            btnAlign:'r',
            title: '提示',
            btn: confirmBtn,
            shade: layer_shade,
            area: ['480px', '190px'],
            success: function () {
                $(".layui-layer-content").css('text-align', 'left');
            },
        }, function() {
            // 确认执行
            performOperation(status, '');
        });
    }

    // 确认发货
    function confirmSend(status) {
        var confirmTitle = '快递公司：<input type="text" id="deliveryName"><br/><br/>';
        // var confirmTitle = '快递公司：<select> </select> <br/><br/>';
        confirmTitle += '快递单号：<input type="text" id="deliveryCode">';
        layer.confirm(confirmTitle, {
            title: false,
            closeBtn: 0
        }, function() {
            var deliveryName = $('#deliveryName').val();
            var deliveryCode = $('#deliveryCode').val();
            var delivery = {name: deliveryName, code: deliveryCode};
            performOperation(status, delivery);
        }, function(index) {
            layer.closeAll(index);
        });
    }

    // 执行审核操作
    function performOperation(status, delivery) {
        var postData = {
            _ajax: 1,
            status: status,
            users_id: {$Service.users_id},
            order_id: {$Service.order_id},
            details_id: {$Service.details_id},
            service_id: {$Service.service_id},
            product_id: {$Service.product_id},
            delivery: delivery ? delivery : {},
            service_type: {$Service.service_type},
        };
        layer_loading('正在处理');
        $.ajax({
            type: 'post',
            url : "{:url('ShopService/after_service_handle')}",
            data: postData,
            dataType: 'json',
            success: function(res) {
                layer.closeAll();
                if (1 == res.code) {
                    layer.msg(res.msg, {time: 1500}, function() {
                        if (8 === parseInt(status)) {
                            window.location.href = res.url;
                        } else {
                            window.location.reload();
                        }
                    });
                } else {
                    layer.msg(res.msg, {time: 1500});
                }
            }
        });
    }

    // 维权服务手办完成服务单并自行退款 -- 目前停用
    // function manualRefund() {
    // service_id, users_id, order_id, service_type
    //     layer.prompt({
    //         value: ' ',
    //         closeBtn: 3,
    //         formType: 2,
    //         btnAlign:'r',
    //         title: '提示',
    //         shade: layer_shade,
    //         id: 'manualRefund',
    //         btn: ['完成并退款', '取消'],
    //         area: ['300px', '100px'],
    //         success: function(layero, index) {
    //             var msg = '<span style="color: red; font-size: 16px;">是否确认手办完成服务单并自行退款？</span><br/><br/> <span style="color: #999; font-size: 14px;">请填写手办完成服务单原因(非必填)。</span><br/><br/> ';
    //             $(".layui-layer-content").css('text-align', 'left');
    //             $("#manualRefund").prepend(msg);
    //         }
    //     }, function(value, index, elem) {
    //         // 维权服务手办完成服务单并自行退款
    //         var status = 1 == service_type ? 6 : 7;
    //         performOperation(service_id, users_id, order_id, status, 0, 0, 1, value);
    //         layer.close(index);
    //     });
    // }
</script>

{include file="public/footer" /}